//找出二维数组的鞍点

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int main()
{
        int i,j,n,m,lemp,max,k;
        srand(time(NULL));
        scanf ("%d %d",&n,&m);
        int a[n][m];
        for (i=0;i<n;i++)
                for (j=0;j<m;j++)
                {
                        a[i][j]=rand()%100;
                }
	printf("===================\n");
        for (i=0;i<n;i++)
        {
                for (j=0;j<m;j++)
                        printf("%3d ",a[i][j]);
                printf("\n");
        }
        printf("===================\n");

	lemp=0;
	for (i=0;i<n;i++)
	{
		max=0;
		for (j=1;j<m;j++)
			if (a[i][max]<a[i][j])
				max=j;
		for (k=0;k<n;k++)
			if (a[i][max]>a[k][max])
				break;
		if (k==n)
		{
			lemp=1;
			printf("第%d行，第%d列，鞍数为%d\n",i+1,max+1,a[i][max]);
		}
	}
	if (lemp==0)
		printf("没有鞍数!\n");

	return 0 ;
}


